package Model;

import java.io.Serializable;

/*
 * @author Roch San Buenaventura
 */

public class PropertyOwns2 extends PropertyState implements Serializable
{

	private static PropertyOwns2 INSTANCE = null;
	final static long serialVersionUID = 214;
	
	protected PropertyOwns2() 
	{
	
	}
	
	public static PropertyState Instance() 
	{
		if (INSTANCE == null) {
			INSTANCE = new PropertyOwns2();
		}
		
		return INSTANCE;
	}

	public void landOn(Player player, PropertySpace property) 
	{
		property.getOwner().collectRent(property.getRentValues()[1], player);
	}

	protected void ownershipIncrease(PropertySpace p) 
	{
		p.changeState(PropertyOwns3.Instance());
	}
	
	protected void ownershipDecrease(PropertySpace p) 
	{
		p.changeState(PropertyOwned.Instance());
	}
	
	protected String getNameAndStatus() 
	{
		return " (2 Owned)";
	}
	
	public String toString() 
	{
		return "PropertyOwns2";
	}
}
